#ifndef __QUERY_PKG_H__
#define __QUERY_PKG_H__
#include "package_base.h"

class THD;

class QueryPkg : public IPkg
{
public:
	QueryPkg();
	virtual ~QueryPkg();
public:
	virtual Result Parse(Context* pCtx);
	virtual Result Check(Context* pCtx);
	virtual const char* Pkg() {return m_sQuery.c_str();}
	virtual int PkgSize() {return m_sQuery.length();}
private:
	bool IsReadOnly(THD* thd);
	bool IsNoWhere(THD* thd);
private:
	std::string m_sQuery;
	
};

#endif
